<template>
  <div class="child">
    <h2>我是Child</h2>
    男<input 
        type="radio" 
        name="sex" 
        :checked="gender === 'male'"
        @change="changeGender('male')"
      >
    女<input 
        type="radio" 
        name="sex" 
        :checked="gender === 'female'"
        @change="changeGender('female')"
      >
  </div>
</template>

<script>
  export default {
    name:'Child',
    props:['gender','updateGender'],
    methods: {
      changeGender(value){
        console.log('@@@@@@@@')
        this.updateGender(value)
      }
    },
  }
</script>

<style>
  .child {
    background-color: skyblue;
    border-radius: 10px;
    box-shadow: 0 0 10px;
    padding: 20px;
  }
</style>